package com.epam.qanda.db.service;

import com.epam.qanda.db.dao.impl.AnswerDao;

public class AnswerService {
	public <T> void create(T element) {
		new AnswerDao().create(element);
	}

	public <T> T read(Integer id) {
		return new AnswerDao().read(id);
	}

	public void delete(Integer id) {
		new AnswerDao().delete(id);
	}

	public <T> void update(T element) {
		new AnswerDao().update(element);
	}
	
	public <T> T getAllAnswers(Integer questionId) {
	return new AnswerDao().getAllAnswers(questionId);
	}
	
	public <T> void updateLikes(T element) {
		new AnswerDao().updateLikes(element);
	}
	
}
